Received: from sol.ccs.deakin.edu.au (sol.ccs.deakin.edu.au [128.184.1.1]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id CAA10021 for <blitz-list@helsinki.fi>; Thu, 14 Jul 1994 02:53:55 +0300
Received: from hareth (hareth.cm.deakin.edu.au [128.184.80.165]) by sol.ccs.deakin.edu.au (8.6.8.1/8.6.6) with SMTP id JAA21897; Thu, 14 Jul 1994 09:52:44 +1000
From: Mark Kuzmycz <kuzmycz@deakin.edu.au>
Received: by hareth (5.0/client-1.3)
id AA00470; Thu, 14 Jul 1994 09:52:42 --1000
Date: Thu, 14 Jul 1994 09:52:42 --1000
Message-Id: <9407132352.AA00470@hareth>
To: blitz-list@helsinki.fi
Subject: Creating strings
Cc: acid@iconz.co.nz
X-Sun-Charset: US-ASCII
content-length: 1063
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Status:
Status: RO
Hello fellow Blizers,
I am currently creating a text editor for an Amiga guide generator. So far
I have the basic text editor built. The problem is that when I load a one
thousand line text file it takes 3 to 5 minutes on an Amiga 500. I currently
use an edit(1024) to read a line in at a time. As you can see this time is
unacceptable so I experimented to see how quickly I could count the number
of lines (load the file in the buffer and search for asc 10) and found I
could do this in less than one second.
Since I can determine where each line end I would like to know how to create
a string that is compatable with blitz strings. For example I know
that the first workd of a Blitz string is the size and that the last Character
is a null character. What I don't know is how do I place a string in a string
variable? Do I need to allocate memory or are all strings allocated to the
max string size (I don't think so). Also, is there a way to access the internal
sting buffer as this could speed up the creation of a string.